package practiceTest.chap03.work6;

import chap03.InsertSort.ArrayIns;

import java.util.Date;
import java.util.Random;

/**
 * Created by root on 2017/7/12.
 * 冒泡排序：逆序比随机快
 */
public class test2 {
    public static void main(String[] args){
        int maxSize = 10;
        Random random = new Random(47);
        ArrayIns arr2 = new ArrayIns(maxSize);
        for (int j=maxSize-1;j>=0;j--) {
            long n = random.nextInt(maxSize-1);
            arr2.insert(n);
        }
        arr2.display();
        arr2.InsertSortWhileNoDups();
        arr2.display();
    }
}
